package sk.stuba.fiit.foo07.genex.dao;

import java.sql.SQLException;

import sk.stuba.fiit.foo07.genex.beans.TUser;

/**
 * @author palo
 */

public interface UserDao {

    /**
     * Method for addition of user into database.
     * 
     * @param toAdd
     *                bean representing a user to add
     * 
     */

    public void addTUser(TUser toAdd) throws SQLException;

    /**
     * Method to delete user from database.
     * 
     * @param toDelete
     *                bean representing a user to delete
     * 
     */
    public void deleteTUser(TUser toDelete) throws SQLException;

    /**
     * Method for getting user from database.
     * 
     * @param userID
     *                id of user to get
     * 
     * @return user
     * 
     */
    public TUser getTUserByID(Integer userID) throws SQLException;

    /**
     * Method getting a default user from database. Default user has always Id
     * 1.
     * 
     * 
     * @return user
     * 
     */
    public TUser getDefaultTUser() throws SQLException;

    /**
     * Method for modification of user in database.
     * 
     * @param toUpdate
     *                bean representing a modified user
     * 
     */
    public void updateTUser(TUser toUpdate) throws SQLException;
}
